@extends('admin.main.layout')
@section('title', '添加管理员')
@section('content')
<meta name="csrf-token" content="{{ csrf_token() }}">
<div class="row">
    <div class="col-lg-12">
        <div class="card">
            <div class="m-card m-mb-1">
                <div class="m-form-item">
                    <label><b>*</b>长链接:<font>最长300位</font></label>
                    <div class="m-col-12 m-xs-12">
                        <textarea class="m-textarea" id="link" placeholder="请输入长链接">{{ $shortDetial->link }}</textarea>
                    </div>
                </div>
                <div class="m-form-item">
                    <label><b>*</b>短链接名称:</label>
                    <div class="m-col-3 m-xs-12">
                        <input type="text" class="m-input" id="name" placeholder="请输入短链接名称" value="{{ $shortDetial->name }}">
                    </div>
                </div>
                <div class="m-form-item">
                    <label>链接分组:</label>
                    <div class="m-col-3 m-xs-12">
                        <select class="m-select" id="group_id">
                        </select>
                        <input type="hidden" class="m-input" id="old_group_id" value="{{ $shortDetial->group_id }}">
                        <input type="hidden" class="m-input" id="short_id" value="{{ $shortDetial->short_id }}">
                    </div>
                </div>
                <div class="m-form-item">
                    <label>链接有效期:</label>
                    <div class="m-col-3 m-xs-12">
                        <input type="text" class="m-input" id="end_time" placeholder="请输入短链接名称" value="{{ $shortDetial->end_time }}">
                    </div>
                </div>
                <div class="m-form-item m-mt-1">
                    <div class="m-form-btn m-mr-1" onclick="shortUpdate();">立即更新短链接</div>
                </div>
                <div class="m-info-message">
                    <div class="alert alert-danger"><b>温馨提示：</b>本平台积极配合警方反诈工作！应公安部要求，我们将对生成的内容进行检测，如发现违反法律法规（包括但不限于诈骗、色情、博彩、赌球等），则立即封禁相关账号，且不予退款。</div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="/admin/libs/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/admin/js/short.min.js?v={{ time() }}"></script>
<script type="text/javascript">
    $(document).ready(function(){
        setTimeout(function() {
            var group_id = $("#old_group_id").val();
            $("#group_id").val(group_id);
        },300);
    });
</script>
@endsection
